package com.sunwayhorizo.health.hl7.vocabulary;

import java.util.*;

import com.sunwayhorizo.health.hl7.rim.*;
import com.sunwayhorizo.health.hl7.rim.Rolelink;

public class DataContainer {
	// 关联动作
	private Act act;
	// 参与角色
	private Role role;
	//参与
	private ActParticipation actParticipation;
	//动作关系
	private ActRelationship actRelationship;
	// 关联方向
	private Direction direction;
	// 类型
	private String type;
	//源角色
	private Role source;
	//目标角色
	private Role target	;
	//角色关联
	private Rolelink rolelink;
	// 参与属性名、参与属性值
	private Map<Participation, Object> participations = new HashMap<Participation, Object>();
	// 动作关系属性名、动作关系属性值
	private Map<Relationship, Object> relationships = new HashMap<Relationship, Object>();
	// 角色联系属性名、角色联系属性值
    private Map<Rolelink, Object> rolelinks = new HashMap<Rolelink, Object>();

	public DataContainer(Role role, Map<Participation, Object> participations) {
		this.role = role;
		this.participations = participations;
		type = "";

	}

	public DataContainer(Act act, Map<Relationship, Object> relationships,
			Direction direction) {
		super();
		this.act = act;
		this.direction = direction;
		this.relationships = relationships;
		type = "";
	}
	
	public DataContainer(Act act, ActRelationship actRelationship,
			Direction direction) {
		this.act = act;
		this.direction = direction;
		this.actRelationship = actRelationship;
		type = ActRelationship.class.getSimpleName();
	}
	
	public DataContainer(Role role, ActParticipation actParticipation) {
		this.role = role;
		this.actParticipation = actParticipation;
		type = ActParticipation.class.getSimpleName();
	}

    public DataContainer(Role source, Role target, Rolelink rolelink)
    {
        super();
        this.source = source;
        this.target = target;
        this.rolelink = rolelink;
        type = Rolelink.class.getSimpleName();
    }

    public Act getAct() {
		return act;
	}

	public Role getRole() {
		return role;
	}

	public Direction getDirection() {
		return direction;
	}

	public String getType() {
		return type;
	}

	public Map<Participation, Object> getParticipations() {
		return participations;
	}

	public Map<Relationship, Object> getRelationships() {
		return relationships;
	}

	public ActParticipation getActParticipation() {
		return actParticipation;
	}

	public ActRelationship getActRelationship() {
		return actRelationship;
	}

    public Map<Rolelink, Object> getRolelinks()
    {
        return rolelinks;
    }

    public void setRolelinks(Map<Rolelink, Object> rolelinks)
    {
        this.rolelinks = rolelinks;
    }

    public Role getSource()
    {
        return source;
    }

    public Role getTarget()
    {
        return target;
    }

    public Rolelink getRolelink()
    {
        return rolelink;
    }

}
